package com.nbsaas.boot.data.data.entity;

import com.nbsaas.boot.code.annotation.FieldConvert;
import com.nbsaas.boot.code.annotation.FieldName;
import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.code.annotation.FormField;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;
import java.util.Date;


@org.hibernate.annotations.Table(appliesTo = "sys_common_query_template_debug", comment = "调试记录")
@Data
@FormAnnotation(model = "调试记录")
@Entity
@Table(name = "sys_common_query_template_debug")
public class QueryDebug extends LongEntity {


    @FormField(title = "模板", grid = true, width = "160", col = 22)
    @FieldName
    @FieldConvert(classType = String.class)
    @ManyToOne(fetch = FetchType.LAZY)
    private QueryTemplate queryTemplate;


    @Column(length = 2000)
    @FormField(title = "调试参数", grid = true, width = "400", col = 22)
    @Comment("调试参数")
    private String param;


    @Column(length = 9999)
    @FormField(title = "调试信息", grid = true, width = "400", col = 22)
    @Comment("调试信息")
    private String debugInfo;

    @FormField(title = "添加时间", grid = true, width = "160", ignore = true)
    @Comment("添加时间")
    private Date addDate;

    @Comment("最新修改时间")
    private Date lastDate;
}
